package com.dayuanit.dy15.lesson21.demo3;

import java.util.ArrayList;

public class Test {

    public static void main(String[] args) {
        ArrayList arrayList = new ArrayList<>();
        arrayList.add("tom");
        arrayList.add("bob");

//        System.out.println(arrayList.size());
//        System.out.println(arrayList.get(2));


        System.out.println("-----------");

        MyArrayList<String> myArrayList = new MyArrayList();
        myArrayList.add("tom");
        myArrayList.add("bob");
        myArrayList.add("jack");
//        myArrayList.add(true);
//        myArrayList.add(200);

//        myArrayList.set(1, "bob2");
        myArrayList.remove(1);
        System.out.println(myArrayList.get(1));

        String s = myArrayList.get(1);

        myArrayList.set(1, "ccc");

        System.out.println(myArrayList.size());

    }
}
